home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 1999 January - Disc 2 / Macworld (1999-01) (Disk 2).dmg / Serious Demos / Symbolic Composer 4.2 / Environment / System / DEF / Compile / compile-song < prev    next >
Lisp/Scheme  |  1998-10-23  |  5KB  |  89 lines

  1. compile-song output-path resolution file-name
  2.                                 def-timesheet &rest def-timesheets 
  3.                              or 
  4.                              def-tonality-change &rest def-tonality-changes 
  5.  
  6. compile-song compiles a def-timesheet description to a folder described in output-path using a resolution value to interprete start/stop information on the def-time-sheet. 
  7.  
  8. There can be any number of definition lines in one compile-song. The definition lines can be both def-timesheet or def-tonality-change definitions. Def-timesheet contains instrument names and the start/stop information string. Def-tonality-change requires a tonality description(s) contained in a variable and a newly defined variable incorporating both tonality descriptions and the tonality change definition string. Def-tonality-change defines a sequence of tonality changes. The change points are marked as dots in the definition string.
  9.  
  10. The tonalities are taken from the input atom, which contains the note lists returned by activate-tonality. The output atom is the actual tonality name that is to be used in def-timesheet definition. Note that there can be any number of tonality change definitions in any place in compile-song.
  11.  
  12. compile-song is used when the musical material can be organised by a graphic scoring mechanism using a beat/space graphic combination "-" and " " responding to a single resolution. Think of this resolution as a single zone length but independent of tonality control which is defined separately and graphically with tonality change points. The "-" and " " control the progress of a symbol pattern. They start and stop the pattern "---  - - ". When a long pattern reaches a " " progress through the pattern is halted until a "-" appears. If the pattern is nested (( . . )) the pattern will restart at each "-".
  13.  
  14. (setq symbols '(a b c d e f g))
  15.  
  16. (def-symbol
  17.    test1 symbols
  18. )
  19.  
  20. (setq tonals (activate-tonality (blues1 c 5) (chromatic c 6)))
  21.  
  22. (compile-song "ccl;output:" 1/4 "part2"
  23. ;                     |---|---|---|---|
  24.    changes tonals    "....    ..  ... "
  25.    test1   changes   "-  - -- - --- --"
  26. )
  27.  
  28. Example
  29.  
  30. In this example the resolution of the time sheet is 1/1. This means that every  "-" sign in the start/stop string lasts exactly one bar of 4/4, the value of a whole note. The lines beginning with comment signs ; can be used to represent the song structure. The tonalities of the instruments (like master in the example are defined inside compile-song.
  31.  
  32. (compile-song "ccl;output:" 1/1 "part3"
  33. ;            structure !-I-!---a---------------!---b-----------!---tran--
  34. ;            bars      1               17              33              49
  35. ; --drums--            !---!---!---!---!---!---!---!---!---!---!---!---!-
  36. drum1      mt-32      " -------                                --------"
  37. drum2      mt-32      "    ------------------------------------        "
  38. perc       mt-32      "                            --------            "
  39. fill       mt-32      "-              -              -        -       -"
  40. hihat1     mt-32      " -----------------------------------            "
  41. hihat2     mt-32      "                                    ------------"
  42. ;            bars      1               17              33              49
  43. ; --instruments--      !---!---!---!---!---!---!---!---!---!---!---!---!-
  44. master     chords     "        .               .   .           .       "
  45. bass       master     " -----------------------                --------"
  46. strings    master     "                        ----------------        "
  47. theme      master     "        ----------------            --------    "
  48. transit    master     "                                        --------"
  49. effects    master     "                 -------    ----            ----"
  50. )
  51.  
  52. Changing Timesheet Resolution
  53.  
  54. This example demonstrates how the timesheet can be used at different  resolutions to control the organisation of start/stop events more precisely. Using 1/4 as the resolution changes the timesheet resolution accordingly. Now we need four columns to represent one bar of music.
  55.  
  56. (setq symbols '(a b c d e f g))
  57.  
  58. (def-symbol
  59.    test1 symbols
  60.    test2 symbols
  61.    test3 symbols
  62.    test4 symbols
  63. )
  64.  
  65. (def-length
  66.    default '1/16
  67. )
  68.  
  69. (setq tonals (activate-tonality (blues1 c 4) (chromatic c 6)) 
  70.  
  71. (def-channel
  72.    test1 1
  73.    test2 2
  74.    test3 3
  75.    test4 4
  76. )
  77.  
  78. (def-tempo 120)
  79.  
  80. (compile-song "ccl;output:" 1/4 "score"
  81. ;               bars  1   2   3   4
  82. ;                     !---!---!---!---!
  83. scale  tonals        " ..."
  84. test1  scale         "-   "
  85. test2  scale         " -  "
  86. test3  scale         "  - "
  87. test4  scale         "   -"
  88. )
  89.